package com.smedi.ismedi.personnel.api.dto.response;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @Author: xulinjun
 * @Date: 2021-6-11 9:34
 */
@Data
@Accessors(chain = true)
public class InternalPersonAssignmentResponse implements Serializable {
    @ApiModelProperty(value = "人员id")
    private Long personId;

    @ApiModelProperty(value = "人员姓名")
    private String lastName;

    @ApiModelProperty(value = "性别")
    private String gender;

    @ApiModelProperty(value = "性别含义")
    private String genderMeaning;

    @ApiModelProperty(value = "人员类型")
    private String personType;

    @ApiModelProperty(value = "人员类型含义")
    private String personTypeMeaning;

    @ApiModelProperty(value = "员工编号")
    private String employeeNum;

    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "身份证")
    private String idCard;

    @ApiModelProperty(value = "座机")
    private String officeTelephone;

    @ApiModelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "企业职务")
    private String internalJobNames;

    @ApiModelProperty(value = "角色")
    private String roleNames;

    @ApiModelProperty(value = "状态")
    private String status;

    @ApiModelProperty(value = "状态含义")
    private String statusMeaning;

    public String getGender() {
        if (this.gender.equals("M") || this.gender.equals("MALE")) {
            return "MALE";
        } else {
            return "FEMALE";
        }
    }

    public String getGenderMeaning() {
        if (this.gender.equals("M") || this.gender.equals("MALE")) {
            return "男";
        } else {
            return "女";
        }
    }
}
